<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>
<%@taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>用户管理页面 >> 用户修改页面</span>
        </div>

        <c:forEach var="err" items="${error}">
            ${err.code}-----${err.defaultMessage}
        </c:forEach>

        <div class="providerAdd">
            <form id="userForm" name="userForm" method="post" action="${pageContext.request.contextPath }/updateOperation">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div>
                    <label for="userCode">用户ID：</label>
                    <input type="text" name="id" id="id" value="${updateUser.id}" readonly>
                    <!-- 放置提示信息 -->
                    <font color="red"></font>
                </div>
                <div>
                    <label for="userCode">用户编码：</label>
                    <input type="text" name="usercode" id="userCode" value="${updateUser.usercode}">
                    <!-- 放置提示信息 -->
                    <font color="red"></font>
                </div>
                <div>
                    <label for="userName">用户名称：</label>
                    <input type="text" name="username" id="userName" value="${updateUser.username}">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="userPassword">用户密码：</label>
                    <input type="password" name="userpassword" id="userPassword" value="${updateUser.userpassword}">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="ruserPassword">确认密码：</label>
                    <input type="password" name="ruserpassword" id="ruserPassword" value="${updateUser.userpassword}">
                    <font color="red"></font>
                </div>
                <div>
                    <label >用户性别：</label>
                    <select name="gender" id="gender">
                        <option value="1" selected="selected" ${updateUser.gender==1?'selected':''}>男</option>
                        <option value="2" ${updateUser.gender==2?'selected':''}>女</option>
                    </select>
                </div>
                <div>
                    <label for="birthday">出生日期：</label>
                    <input type="text" Class="Wdate" id="birthday" name="birthday" value="${updateUser.birthday}"
                           readonly="readonly" onclick="WdatePicker();">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="phone">用户电话：</label>
                    <input type="text" name="phone" id="phone" value="${updateUser.phone}">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="address">用户地址：</label>
                    <input name="address" id="address"  value="${updateUser.address}">
                </div>
                <div>
                    <label >用户角色：</label>
                    <!-- 列出所有的角色分类 -->
                    <select name="userrole" id="userrole">
                        <option value="0" >--请选择--</option>
                        <option value="1" ${updateUser.userrole==1?'selected':''}>管理员</option>
                        <option value="2" ${updateUser.userrole==2?'selected':''}>经理</option>
                        <option value="3" ${updateUser.userrole==3?'selected':''}>普通员工</option>
                    </select>
                    <font color="red"></font>
                </div>

                <div class="providerAddBtn">
                    <input type="button" name="save" id="save" value="保存" />
                    <input type="button" id="back" name="back" value="返回"/>
                </div>
            </form>

        </div>
    </div>
</section>
<%@include file="/WEB-INF/jsp/common/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/usermodify.js"></script>
